<template>
  <el-form
    :model="rateForm"
    :rules="rateRules"
    ref="rateForm"
    label-position="right"
    label-width="180px"
  >
    <!-- <div class="rate-box"></div> -->
    <div class="haruyuki-form-title">{{ basicTitleData.typeTitle }}</div>
    <el-row :gutter="20">
      <el-col :span="8">
        <el-form-item label="扫码费率（单位：%）:" prop="codeScanningRate">
          <el-input-number
            size="small"
            v-model="rateForm.codeScanningRate"
            :precision="4"
            :step="0.0001"
            :min="0"
            :max="1"
          ></el-input-number>
        </el-form-item>
      </el-col>
      <!-- <el-col :span="8">
        <el-form-item label="是否开通D0结算:" prop="codeAdvanceOpen">
          <el-switch v-model="rateForm.codeAdvanceOpen" active-value="1" inactive-value="0"></el-switch>
        </el-form-item>
      </el-col> -->
      <el-col :span="8">
        <el-form-item label="垫资费费率（单位：%）:" prop="codeAdvanceRate">
          <el-input-number
            size="small"
            v-model="rateForm.codeAdvanceRate"
            :precision="4"
            :step="0.0001"
            :min="Number(codeAdvanceRate)"
            :max="1"
          ></el-input-number>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
export default {
  props: {
    rateForm: Object,
    codeAdvanceRate: {
      type: [Number, String],
      default: 0,
    },
  },
  watch: {},
  data() {
    return {
      basicTitleData: {
        typeTitle: "费率信息",
      },
      rateRules: {
        codeScanningRate: [
          { required: true, message: "请输入扫码费率", trigger: "blur" },
        ],
        codeAdvanceRate: [
          { required: true, message: "请输入垫资费费率", trigger: "blur" },
        ],
        // codeAdvanceOpen: [
        //   { required: true, message: "是否开通D0结算", trigger: "blur" },
        // ]
      },
    };
  },
  methods: {},
};
</script>

<style>
.rate-box {
    margin-top: 40px;
}
</style>